using System;
using System.Windows;

namespace FluentSilverlight.Expressions.Font
{
    public class FontWeightExpression<TParentPart>
    {
        private readonly TParentPart parentPart;
        private readonly Action<FontWeight> setValue;

        public FontWeightExpression(TParentPart parentPart, Action<FontWeight> setValue)
        {
            this.parentPart = parentPart;
            this.setValue = setValue;
        }

        public TParentPart Black()
        {
            setValue(FontWeights.Black);
            return parentPart;
        }

        public TParentPart Bold()
        {
            setValue(FontWeights.Bold);
            return parentPart;
        }

        public TParentPart ExtraBlack()
        {
            setValue(FontWeights.ExtraBlack);
            return parentPart;
        }

        public TParentPart ExtraBold()
        {
            setValue(FontWeights.ExtraBold);
            return parentPart;
        }

        public TParentPart ExtraLight()
        {
            setValue(FontWeights.ExtraLight);
            return parentPart;
        }

        public TParentPart Light()
        {
            setValue(FontWeights.Light);
            return parentPart;
        }

        public TParentPart Medium()
        {
            setValue(FontWeights.Medium);
            return parentPart;
        }

        public TParentPart Normal()
        {
            setValue(FontWeights.Normal);
            return parentPart;
        }

        public TParentPart SemiBold()
        {
            setValue(FontWeights.SemiBold);
            return parentPart;
        }

        public TParentPart Thin()
        {
            setValue(FontWeights.Thin);
            return parentPart;
        }
    }
}